import request from '@/utils/request'

// 查询库存数量列表
export function listStock(query) {
  return request({
    url: '/wms/stock/list',
    method: 'get',
    params: query
  })
}

// 查询库存数量详细
export function getStock(id) {
  return request({
    url: '/wms/stock/' + id,
    method: 'get'
  })
}

// 新增库存数量
export function addStock(data) {
  return request({
    url: '/wms/stock',
    method: 'post',
    data: data
  })
}

// 修改库存数量
export function updateStock(data) {
  return request({
    url: '/wms/stock',
    method: 'put',
    data: data
  })
}

// 删除库存数量
export function delStock(id) {
  return request({
    url: '/wms/stock/' + id,
    method: 'delete'
  })
}

// 查询出入库记录列表
export function listStockLog(query) {
  return request({
    url: '/wms/stockLog/list',
    method: 'get',
    params: query
  })
}

// 查询出入库记录详细
export function getStockLog(id) {
  return request({
    url: '/wms/stockLog/' + id,
    method: 'get'
  })
}

// 新增出入库记录
export function addStockLog(data) {
  return request({
    url: '/wms/stockLog',
    method: 'post',
    data: data
  })
}